<template>
  <div class="container">
    <div class="container-content">
        <div class="permissions" v-show="isValue">
                <img src="../../assets/images/error/noauth.8ee9.svg">
                <div class="permissions-title">你没有访问权限!</div>
                <div class="permissions-text">服务器拒绝处理你的请求！你可能没有访问此操作的权限</div>
        </div>
      <div v-show="tabs">
        <div class="container-title">准备好进行在线销售。让我们按照下方提示进行操作吧。</div>
      <div class="content">
        <el-tabs :tab-position="tabPosition" style="height: 300px;">
          <el-tab-pane label="上传商品">
            <div class="text">
              <p>1.生成token。</p>
              <p>2.将token和默认域名等信息填入item后台。</p>
              <p>3.从item后台上传商品。</p>
              <p>4.在站点后台上架商品。</p>
              <p>5.设置商品系列。</p>
            </div>
            <div class="button-btn">
              <button class="btn" @click="handleGo('app-private')">去设置</button>
            </div>
          </el-tab-pane>
          <el-tab-pane label="设置物流">
            <div class="text">
              <p>1.站点默认域名添加到item站点管理配置中。</p>
              <p>2.设置订单拉取时间，拉取该时间段内产生的订单。</p>
              <p>3.保存应用设置。</p>
            </div>
          </el-tab-pane>
          <el-tab-pane label="设置收款">
            <div class="text">设置收款方式，添加收款账号。</div>
            <div class="button-btn">
              <button class="btn" @click="handleGo('collection-channels')">去设置</button>
            </div>
          </el-tab-pane>
          <el-tab-pane label="运费方案">
            <div class="text">可设置不同国家地区的运费方案。</div>
            <div class="button-btn">
              <button class="btn" @click="handleGo('freight')">去设置</button>
            </div>
          </el-tab-pane>
          <el-tab-pane label="店铺装修">
            <div class="text">可设置店铺的主题装修，进行全局设置及装修卡片的调整分布。可在装修中设置导航、自定义页面。</div>
            <div class="button-btn">
              <button class="btn" @click="handleGo('theme')">去装修</button>
            </div>
          </el-tab-pane>
          <el-tab-pane label="添加域名">
            <div class="text">可设置自定义域名帮助用户更快找到您的在线店铺。</div>
            <div class="button-btn">
              <button class="btn" @click="handleGo('domain-name')">去设置</button>
            </div>
          </el-tab-pane>
        </el-tabs>
      </div>
      </div>
    </div>
  </div>
</template>

<script>
import {mapGetters} from 'vuex';

export default {
    name: 'index',
    data () {
        return {
            isValue: false,
            tabs: true,
            tabPosition: 'left',
            color: 'rgb(63, 161, 255)'
        };
    },
    created () {
    },
    computed: {
        ...mapGetters(['menus'])
    },
    mounted () {
    },
    methods: {
        handleGo (name) {
            if (this.menus.includes(name)) {
                this.$router.push({name});
            } else {
                this.isValue = true;
                this.tabs = false;
            }
        }
    }
};
</script>

<style lang="scss" scoped>
.container {
  width: 100%;
  height: 800px;
  display: flex;
  justify-content: center;
  //   align-items: center;
  margin-top: 40px;
  background:rgb(243, 243, 243);
}
.el-tabs--left .el-tabs__item.is-left {
  text-align: right;
  font-size: 16px;
}
.el-tabs__item.is-active {
  color: #409EFF;
  background: rgb(241, 241, 241);
}
.container-content{
  width: 60%;
  height: 500px;
}
@media screen and (max-width: 756px) {
  .container-content {
    width: 100%;
  }
}
.container-title{
  font-size: 16px;
  padding:20px 0;
}
.permissions{
    width: 100%;
    height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
    background: white;
    line-height: 30px;
}
.permissions img{
    width: 340px;
    height: 140px;
    margin-top: 20px;
}
.permissions-title{
   text-align: center;
   font-size: 18px;
   color: #30344F;
   padding-top: 20px;
   font-weight: 500;
}
.permissions-text{
   font-size: 16px;
   padding-top: 10px;
   color: #30344F;
}
.content{
  padding: 40px 20px;
  background: white;
  border-radius:3px ;
  // height: 300px;
}
.content-title{
  font-size: 18px;
  color: #303350;
}
.el-tabs--left .el-tabs__nav-wrap.is-left::after, .el-tabs--left .el-tabs__nav-wrap.is-right::after, .el-tabs--right .el-tabs__nav-wrap.is-left::after, .el-tabs--right .el-tabs__nav-wrap.is-right::after {
  height: 80%;
  width: 2px;
  bottom: auto;
  top: 0;
}
.text{
  padding: 20px 10px;
  font-size: 14px;
}
.button-btn{
  margin: 40px 20px;
}
.btn{
  width: 80px;
  height: 30px;
  font-size: 14px;
  color: #fff;
  border-radius:3px ;
  background: #409EFF;
  border: none;
  cursor: pointer;
}
.btn-text{
  font-size: 14px;
  color: rgb(129, 128, 128);
  margin-left: 15px;
  cursor: pointer;
}
</style>
